package com.joyxy.easy;

import com.joyxy.easy.gui.GameAssistantUI;
import com.joyxy.easy.manger.WindowManager;

import javax.swing.*;

public class Main {
    public static void main(String[] args) {
        // 启动UI
        SwingUtilities.invokeLater(() -> {
            GameAssistantUI ui = new GameAssistantUI();
            ui.setSize(800, 600);
            ui.setVisible(true);
        });

        // 安全关闭钩子
        Runtime.getRuntime().addShutdownHook(new Thread(() -> {
            WindowManager.getActiveWindows().forEach(ctx -> {
                WindowManager.unbindWindow(ctx.getHwnd());
            });
        }));
    }
}
